﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp
{
    
    public class Adress
    {
        public string? Street {  get; set; }
        public string? City { get; set; }
        public string? Country { get; set; }
    }
    public class Person
    {
        public string Name { get; set; }
        public int Age {  get; set; }
            
    }
    public static class PersonExtensions
    {
        public static string GetAddressDetails(this Adress address,Person person)
        {
            return $"{person.Name}'s Age is {person.Age}, lives at {address.Street},{address.City},{address.Country},";
        }
    }
        
    class Program
    {
        static void Main1(string[] args)
        {
            Person person = new Person() { Name = "张三", Age = 20 };
            Adress adress = new Adress() { Street = "金葵路", City = "上海", Country = "中国" };
            string details = adress.GetAddressDetails(person);
            Console.WriteLine(details);
        }
    }
    
}
